%MY_DFT1D Converts a function f in frequency space using 1D DFT.
%The formula is applied as seen on class. 
function [ dft ] = my_dft1D( f )

dft = zeros(size(f));
e = exp(1);
N = size(f);
N = N(2);

for k = 1:N
    for j = 1:N
        dft(k) = dft(k) + f(1,j) * e^(-2*pi*i*j*k/N);
    end
end

end

